

<div class="container">
     <?php 
    include_once 'member-topcommon.php';
    include 'member-left.php';
    ?>
    <div class="col_r">
        <div class="col_l w765">
            <div class="yoh">
                <div class="avatar">
                    <a href="/thanh-vien?mid=<?php echo $_GET['mid']; ?>" title="<?php echo $_SESSION['mem']['fullname']; ?>">
                        <img src="<?php echo $common->get_avatar_thumb($_SESSION['mem']['avatar']); ?>" width="50" />
                    </a>
                </div>
                <?php
                $imageDetail = $member->viewImage();
                ?>
                <h2>Ảnh của <a href="/thanh-vien?mid=<?php echo $_SESSION['mem']['id']; ?>"><?php echo $_SESSION['mem']['fullname']; ?></a> - <br><i> <b class="last"><a href="/thanh-vien?mid=<?php echo intval($_SESSION['mem']['id']); ?>&aid=<?php echo $_GET['aid']; ?>&action=anhcuatoi">Trở lại album</a></b>  <b class="last"><a href="/thanh-vien?mid=<?php echo $_SESSION['mem']['id']; ?>&action=xemalbum">Ảnh của tôi</a></b></i>
                    <div class="right w350">
                        <ul class="slide-photo-btn">


                            <?php 
                            if(intval($imageDetail['arrNext']['id'])){
                            ?>
                            <li><a href="/thanh-vien?mid=<?php echo intval($_SESSION['mem']['id']); ?>&aid=<?php echo intval($_GET['aid']); ?>&image_id=<?php echo $imageDetail['arrNext']['id']; ?>&action=xemanh" id="idLinkPre" class="next-photo-btn"></a></li>
                            <?php
                            }else{
                            ?>
                            <li><a href="javascript:;" id="idLinkPre" class="next-photo-btn"></a></li>
                            <?php
                            }
                            ?>

                     
                            <li><a class="zoom-photo-btn" href="javascript:void(0)" ></a></li>

                            
                            <?php 
                            if(intval($imageDetail['arrPre']['id'])){
                            ?>
                            <li><a href="/thanh-vien?mid=<?php echo intval($_SESSION['mem']['id']); ?>&aid=<?php echo intval($_GET['aid']); ?>&image_id=<?php echo $imageDetail['arrPre']['id']; ?>&action=xemanh" id="idLinkNext" class="previous-photo-btn"></a></li>
                            <?php
                            }else{
                            ?>
                            <li><a href="javascript:;" id="idLinkNext" class="previous-photo-btn"></a></li>
                            <?php
                            }
                            ?>
  
                        </ul>
                    </div>
                </h2>

                <div class="clear"></div>
            </div>

            
            <div class="view_image">
                <div class="img_display">
                    <?php list($width, $height) = getimagesize(DOMAIN . $imageDetail['arrRs']['real_image']);?>
                    <img src="<?php echo $imageDetail['arrRs']['real_image']; ?>" <?php if($width>770) echo 'style="width:770px"';?>/>
                </div>
                <div class="left-col-02">
                    <div id="displayBlogComment">
                        <?php
                        while ($row = $db->fetch_array($imageDetail['rsComment'])) {
                            $memberChildInfo = $member->getById(intval($row['mid']));
                            ?>
                            <div id="subComment_<?php echo $row['id']; ?>" class="divSubBlogComment highlight">
                                <div class="avatar2">
                                    <a href="/thanh-vien?mid=<?php echo $memberChildInfo['id']; ?>" title="<?php echo $memberChildInfo['fullname']; ?>">
                                        <img src="<?php echo $memberChildInfo['avatar']; ?>" width="32" height="32"/>
                                    </a>
                                </div>
                                <div class="comment2">
                                    <a href="/thanh-vien?mid=<?php echo $memberChildInfo['id']; ?>" title="<?php echo $memberChildInfo['fullname']; ?>"><b><?php echo $memberChildInfo['fullname']; ?>:</b></a>
                                    <?php echo $row['comment']; ?>
                                    <br/>
                                    <span class="sendDate"><?php echo $date_fomat->diff(strtotime($row['create_date'])); ?></span>
                                </div>
                            </div>
                            <?php
                        }
                        ?>

                    </div>
                    <div class="divSubBlogComment highlight">
                        <textarea style="height: 16px" id="comment" class="commentCon" >Viết bình luận...</textarea>
                        <input type="hidden" id="image_id" value="<?php echo intval($_GET['image_id']); ?>"/>
                        <input type="hidden" id="myFullname" value="<?php echo $memberChildInfo['fullname']; ?>"/>
                        <span class="spanSubmitComment">
                            <input type="button" id="sendComment"  class="btnBlogComment"  value="Bình luận"/>
                        </span>
                    </div> 
                </div>
                <div class="right-col-02">
                    <?php if ($member->isOwner()) { ?>

                        <div class="links">
                            <ul class="square">
                                <!--li><a onclick="javascript:editImage('<?php echo intval($_GET['mid']); ?>','<?php echo intval($_GET['image_id']); ?>');" href="javascript:void(0)" >Chỉnh sửa ảnh</a></li-->
                                <li><a onclick="javascript: Lightbox.showConfirm('Xác nhận xóa ảnh', 'Bạn có chắc muốn xóa ảnh này không?', 'removeImage(<?php echo intval($_GET['image_id']); ?>,<?php echo intval($_SESSION['mem']['id']); ?>,<?php echo $_GET['aid']; ?>)');" lang="/thanh-vien?mid=<?php echo intval($_SESSION['mem']['id']); ?>&aid=<?php echo $_GET['aid']; ?>&action=anhcuatoi" title="Xóa ảnh này" href="javascript:void(0)">Xóa ảnh này</a></li>
                                <!--li><a onclick="Lightbox.show('send_photo', 430, '', 'Gửi ảnh lên trang cá nhân'); scrollTo(350); return false;" href="javascript:void(0);" class="shareInfo">Gửi ảnh lên trang cá nhân</a></li-->
                                <!--Link crop avatar-->
                                <!--li><a href="javascript:showcrop();" id="cropavatar">Chọn làm ảnh đại diện</a></li-->
                                <!--End-->
                            </ul>
                        </div>

                    <?php } ?>
                </div>
            </div>

        </div>
    </div>
    <script src="/js/view-image.js" type="text/javascript"></script>